import { defHttp } from '/@/utils/http/axios';
import { IPostBarCodeUpdateRaw } from '/@/types/system/auxiliary/barCode/update';
import { IPostBarCodeDeleteRequest } from '/@/types/system/auxiliary/barCode/delete';
import { IPostBarCodeAddRequest } from '/@/types/system/auxiliary/barCode/add';
import { IPostBarCodeListRequest, IPostBarCodeListResponse } from '/@/types/system/auxiliary/barCode/list';
import { IPostRawBarCodeDetailsResponse } from '/@/types/system/auxiliary/barCode/details';

/**
 * 修改条形码
 */
export const apiPostBarCodeUpdatePath = (id: string | number, params: IPostBarCodeUpdateRaw) =>
  defHttp.post({ url: `/system/auxiliary/bar-code/update/${id}`, params });
/**
 * 删除条形码
 */
export const apiPostBarCodeDelete = (params: IPostBarCodeDeleteRequest) => defHttp.post({ url: `/system/auxiliary/bar-code/delete`, params });
/**
 * 新增条形码
 */
export const apiPostBarCodeAdd = (params: IPostBarCodeAddRequest) => defHttp.post({ url: `/system/auxiliary/bar-code/add`, params });
/**
 * 条形码列表
 */
export const apiPostBarCodeList = (params: IPostBarCodeListRequest) =>
  defHttp.post<IPostBarCodeListResponse>({ url: `/system/auxiliary/bar-code/list`, params });
/**
 * 条形码详情
 */
export const apiPostBarCodeDetailsPath = (id: string | number) =>
  defHttp.post<IPostRawBarCodeDetailsResponse>({ url: `/system/auxiliary/bar-code/details/${id}` });
